﻿using IdentityService.Domain.Aggregates.PermitAggregate;

namespace IdentityService.Domain.Repositories
{
    public interface IPermitRepository
    {
        Task AddAsync(Permit permit);
        void Delete(Permit permit);
        void DeleteRangeAndSave(List<Permit> list);  
        Task<Permit?> FindByIdAsync(long id);
        Task<Permit?> FindByIdWithChildrenAsync(long id);
        Task<List<Permit>> FindSolitaryRecords();
        Task<bool> CheckExistByIdAsync(long id);
        Task<bool> CheckExistByNameAsync(string name);
    }
}
